-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[flutter_plugin_tools] Support YAML exception lists #4183
Conversation
ACTIONS=("$@") | ||
if [[ "${#ACTIONS[@]}" == 0 ]]; then | ||
ACTIONS=("analyze" "--custom-analysis" "$CUSTOM_FLAG" "test" "java-test") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing uses this, so I removed it as opportunistic cleanup while removing the condition below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice improvement
Hey - in the future, can you ping me when you make changes to |
Seems like we should have a comment or ci check to try to avoid this in the future. I didn't even know the dart bots ran flutter plugins tests, makes sense though. Or we could make a script that wraps up the analyze invocation so we just have to change it in one repo. |
Sorry, I completely forgot you'd set that up in the Dart CI :( Now that we have the config file it may be safer to have that test use flutter_plugin_tools directly rather than using the wrapper script. |
I think either moving off of using the wrapper script and putting a comment in the yaml file, or making a trivial dedicated wrapper per @gaaclarke's suggestion, are the best long-term options, since the goal now is to minimize, or even eliminate, the current shell script |
I do expect some (infrequent) breakages due to driving this from an upstream repo. But whatever we can do to make this reasonably stable - with most of the knowledge of how to analyze the repo in the repo itself, and only a small entry-point that something off-repo would need to depend on - would be great. For reference, this is where we drive it from (from our analyzer pre-submit bot): https://github.com/dart-lang/sdk/blob/master/tools/bots/flutter/analyze_flutter_plugins.sh. The less that script has to know about the internals of the flutter/plugins repo to more stable it'll be. |
A wrapper script is safer since it's a single point of failure, it's just not ideal that we would have to run that one command differently forever. If we put the details of the call in the Dart repo script it will break if we change how My preference would be for the latter if you're okay with occasional update as long as we have a process (the test) for making sure we don't forgot to tell you like I did this time. |
Adds a unit test and comments intended to avoid accidental breakage of the Dart repo's run of analysis against this repository. Addresses flutter#4183 (comment)
I suspect that longer term we'd want the |
The long term goal is to not have anything in the repo that has its own analysis options: flutter/flutter#76229
I considered this, including making the test exclusion configs a big config file that was broken down by test type and platform that was auto-included. My preference is to make things that we are doing that we don't want to be doing (like using legacy options, or not running tests for some plugins) explicit though. |
Adds a unit test and comments intended to avoid accidental breakage of the Dart repo's run of analysis against this repository. Addresses #4183 (comment)
Currently the tool accepts `--custom-analysis` to allow a list of packages for which custom `analysis_options.yaml` are allowed, and `--exclude` to exclude a set of packages when running a command against all, or all changed, packages. This results in these exception lists being embedded into CI configuration files (e.g., .cirrus.yaml) or scripts, which makes them harder to maintain, and harder to re-use in other contexts (local runs, new CI systems). This adds support for both flags to accept paths to YAML files that contain the lists, so that they can be maintained separately, and with inline comments about the reasons things are on the lists. Also updates the CI to use this new support, eliminating those lists from `.cirrus.yaml` and `tool_runner.sh` Fixes flutter/flutter#86799
Adds a unit test and comments intended to avoid accidental breakage of the Dart repo's run of analysis against this repository. Addresses flutter#4183 (comment)
Currently the tool accepts `--custom-analysis` to allow a list of packages for which custom `analysis_options.yaml` are allowed, and `--exclude` to exclude a set of packages when running a command against all, or all changed, packages. This results in these exception lists being embedded into CI configuration files (e.g., .cirrus.yaml) or scripts, which makes them harder to maintain, and harder to re-use in other contexts (local runs, new CI systems). This adds support for both flags to accept paths to YAML files that contain the lists, so that they can be maintained separately, and with inline comments about the reasons things are on the lists. Also updates the CI to use this new support, eliminating those lists from `.cirrus.yaml` and `tool_runner.sh` Fixes flutter/flutter#86799
Adds a unit test and comments intended to avoid accidental breakage of the Dart repo's run of analysis against this repository. Addresses flutter#4183 (comment)
Adds a unit test and comments intended to avoid accidental breakage of the Dart repo's run of analysis against this repository. Addresses flutter/plugins#4183 (comment)
Currently the tool accepts
--custom-analysis
to allow a list of packages for which customanalysis_options.yaml
are allowed, and--exclude
to exclude a set of packages when running a command against all, or all changed, packages. This results in these exception lists being embedded into CI configuration files (e.g., .cirrus.yaml) or scripts, which makes them harder to maintain, and harder to re-use in other contexts (local runs, new CI systems).This adds support for both flags to accept paths to YAML files that contain the lists, so that they can be maintained separately, and with inline comments about the reasons things are on the lists.
Also updates the CI to use this new support, eliminating those lists from
.cirrus.yaml
andtool_runner.sh
Fixes flutter/flutter#86799
Pre-launch Checklist
dart format
.)[shared_preferences]
///
).